<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>企业微信管理后台</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../css/reset.css">
    <link rel="stylesheet" href="../../css/fonts.css">
    <link rel="stylesheet" href="../../js/bootstrap/css/bootstrap.min.css">
    <!-- bootstrap表格 -->
    <link rel="stylesheet" href="../../js/bootstrap/js/bootstrap-table-master/bootstrap-table.min.css">
    <link rel="stylesheet" href="../../js/layui/css/layui.css">
    <link rel="stylesheet" href="../../css/main.css">
</head>

<body>
    <!--[if lt IE 7]>
            <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->
    <div id="customer_detail">
        <div class="header">
            <div class="back">返回</div>
            <div class="type_select_wrapper">客户详情</div>
        </div>
        <div class="container">
            <div class="header_wrapper">
                <div class="header_left_wrapper">
                    <div class="img_wrapper">
                        <img src="../../images/test.JPG">
                    </div>
                    <!-- 2020-03-16 start -->
                    <!-- 当客户为男性时class名为icon-nan 女性时为icon-nv -->
                    <div class="cus_name">
                        <span class="remark_name">叶铠齐<i class="iconfont icon-nan"></i></span> 
                        <span class="nickname">微信昵称：铠甲的铠_</span>
                    </div>
                    <!-- 2020-03-16 end -->
                </div>
                <div class="contact_type">
                    <div class="type_item wechat">
                        <i class="iconfont icon-icon"></i>
                        <span>微信联系人</span>
                    </div>
                    <div class="type_item company_wechat" style="display: none;">
                        <img src="../../images/company_wechat_logo.png">
                        <span>企业微信联系人</span>
                    </div>
                </div>
            </div>
            <!-- 2020-02-20 start -->
            <div class="logo_wrapper">
                <!-- 2020-03-16 start -->
                <div class="text_item">
                    <span class="text">备注名：</span>
                    <span class="value">叶铠齐</span>
                </div>
                <!-- 2020-03-16 end -->
                <div class="logo_item">
                    <span class="text">标签：</span>
                    <div class="logo_list">
                        <div class="logo_list_item">一般</div>
                        <div class="logo_list_item">重要</div>
                        <div class="logo_list_item">核心</div>
                    </div>
                </div>
            </div>
            <!-- 2020-02-20 end -->
            <div class="center_wrapper">
                <div class="text_item">
                    <span class="text">添加人：</span>
                    <span class="value">刘毅华</span>
                </div>
                <div class="text_item">
                    <span class="text">所在部门：</span>
                    <span class="value">长沙峰之道</span>
                </div>
                <div class="text_item">
                    <span class="text">添加时间：</span>
                    <span class="value">01月16日</span>
                </div>
                <div class="text_item">
                    <span class="text">最后聊天时间：</span>
                    <span class="value">2019年01月16日</span>
                </div>
                <div class="text_item">
                    <span class="text">主动呼叫：</span>
                    <span class="value">10次</span>
                </div>
                <div class="text_item">
                    <span class="text">回复次数：</span>
                    <span class="value">20次</span>
                </div>
            </div>
        </div>
    </div>

    <script src="../../js/jquery-3.3.1.min.js"></script>
    <script src="../../js/bootstrap/js/bootstrap.min.js"></script>
    <script src="../../js/layui/layui.js"></script>
    <!-- 树形结构 -->
    <script src="../../js/proTree.js"></script>
    <script>
        // 2020-02-18 start
        //获取url中的参数
        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg); //匹配目标参数
            if (r != null) return unescape(r[2]);
            return null; //返回参数值
        }
        let member_id = getUrlParam('id'); // 拿到接收到的成员id
        let pageUrl = getUrlParam('page'); // 拿到接收到的page页面地址
        let nav_index = getUrlParam('nav_index')
        // 2020-02-18 end
        layui.use('form', function () {
            var form = layui.form;
            layui.use('layer', function () {
                var layer = layui.layer;

                // 2020-02-18 start
                // 返回
                $(".back").click(function () {
                    self.location.href = pageUrl + ".html?nav_index=" + nav_index
                })
                // 2020-02-18 end
                
                // ajax请求数据 判断客户属性
                let cus_type = "wechat"; // 这里默认为微信
                if (cus_type == 'wechat') {
                    $(".wechat").show()
                    $(".company_wechat").hide()
                } else {
                    $(".wechat").hide()
                    $(".company_wechat").show()
                }

            })
        })

    </script>
</body>

</html>